import {effect} from "./reactive";
import {reactive} from "./reactive";
import {defineComputed} from "./reactive/computed";

const data = reactive({a: 1, b: 2});

const comp = defineComputed(() => {
  return data.a + data.b;
});

effect(() => {
  console.log("computed", comp.value);
});

setInterval(() => {
  data.a++;
}, 1000);

setInterval(() => {
  data.b += 1;
}, 2000);
